//
//  JCBoolExtension.swift
//  JCPublicKit
//
//  Created by JasonLee on 2020/5/13.
//

import Foundation

extension Bool {
    var jc_isTrue: Bool {
        self == true
    }
    var jc_isFalse: Bool {
        self == false
    }
    var jc_toInt: Int {
        return jc_isTrue ? 1 : 0
    }
    var jc_toString: String {
        return jc_isTrue ? "1" : "0"
    }
    var jc_opposite: Bool {
        return !self
    }
    
    mutating func jc_toggle() {
        self = !self
    }
}
